﻿using Groep2TINGHService.DB_Classes;
using Groep2TINGHService.Get_Set_Classes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace Groep2TINGHService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select Service1.svc or Service1.svc.cs at the Solution Explorer and start debugging.
    public class Service1 : IService1
    {
        List<Company> IService1.GetAllCompanies()
        {
            return CompanyDB.GetAllCompanies();
        }
        public List<Role> Get_AllRoles()
        {
            return RoleDB.GetAllRoles();
        }
        public int Insert_Company(Company company)
        {
            return CompanyDB.InsertCompany(company);
        }
        public Company Get_CompanyByName(string name)
        {
            return CompanyDB.GetCompanyByName(name);
        }
        public int Modify_Company(Company company)
        {
            return CompanyDB.ModifyCompany(company);
        }
        public int DeleteCompany(Company company)
        {
            return CompanyDB.DeleteCompany(company);
        }
        public List<ContractFormula> GetAllContractFormula()
        {
            return ContractFormulaDB.GetAllContractFormula();
        }
        public ContractFormula Get_ContractDurationByDescription(ContractFormula Description)
        {
            return ContractFormulaDB.GetContractDurationByDescription(Description);
        }
        public int InsertContract(Contract contract, ContractFormula formula, Company company)
        {
            return ContractDB.InsertContract(contract, formula, company);
        }
        public List<Contract> GetAllContracts()
        {
            return ContractDB.GetAllContracts();
        }
        public Contract GetContractByCompany(string contract)
        {
            return ContractDB.GetContractByCompany(contract);
        }
        public Company GetContractByCompanyWithName(string contract)
        {
            return ContractDB.GetContractByCompanyWithName(contract);
        }
        public ContractFormula GetContractByCompanyWithDescription(string contract)
        {
            return ContractDB.GetContractByCompanyWithDescription(contract);
        }
        public int DeleteContract(string contract)
        {
            return ContractDB.DeleteContract(contract);
        }
        public List<Location> GetAllLocations()
        {
            return LocationDB.GetAllLocations();
        }
        public Guid GetIdfromLocation(string locationName)
        {
            return LocationDB.GetIdfromLocation(locationName);
        }
        public bool InsertReservation(Reservation reservation)
        {
            return ReservationDBB.InsertReservation(reservation);
        }
        public List<Reservation> GetAllReservations()
        {
            return ReservationDBB.GetAllReservations();
        }
        public string GetNamefromLocation(string reservationId)
        {
            return LocationDB.GetNamefromLocation(reservationId);
        }
        public Reservation GetReservationById(string ID)
        {
            return ReservationDBB.GetReservationById(ID);
        }
        public bool DeleteReservation(string Id)
        {
            return ReservationDBB.DeleteReservation(Id);
        }
        public bool ModifyReservation(DateTime date, string id)
        {
            return ReservationDBB.ModifyReservation(date, id);
        }

    }
}
